<template>
  <c-scroll-x height="200">
  	<c-nav-item :title="item.title" name="教程" v-for="(item, index) in dataList" :key="index"
  		@tap="tapItem(item)"></c-nav-item>
  </c-scroll-x>
</template>

<script setup>
// https://json.apisev.cn/pms/course.json
import { ref } from "vue";
import request from "@/lib/request.js";
import useApp from "@/hooks";
const { $ } = useApp();
const dataList = ref([]);
$.get('https://json.apisev.cn/pms/course.json').then(res=>{
	console.log(res)
	dataList.value = res.data;
})
function tapItem(e){
	uni.setStorageSync('selected-course',e);
	uni.navigateTo({
		url:'/custom/edu/pages/course/index'
	})
}
</script>

<style></style>
